{template Public:Admin:header}

<div class="row">
  <div class="col-lg-12">
    <div class="table-toolbar">
      <div class="row">
        <div class="col-lg-12">
          <div class="text-right"> </div>
        </div>
      </div>
      <div class="row">
        <div>
          <form action="{echo U($module.'/'.CONTROLLER_NAME.'/orderoperate')}">
          <div class="row">
          <div class="col-lg-12">
            <div class="col-lg-2">
              <input name="id" type="text" class="form-control" placeholder="任务ID" value="{if !empty($selectarray['id'])}{echo $selectarray['id']}{/if}"/>
            </div>
            <div class="col-lg-2">
              <input name="cid" type="text" class="form-control" placeholder="财务订单ID" value="{if !empty($selectarray['cid'])}{echo $selectarray['cid']}{/if}"/>
            </div>
            
            <div class="col-lg-2">
              <input name="oid" type="text"  class="form-control" placeholder="稿件ID" value="{if !empty($selectarray['oid'])}{echo $selectarray['oid']}{/if}"/>
            </div>
            
             <div class="col-lg-2">
              <select name="process" class="form-control">
                <option value=""{if !$_GET['process'] && !IsNum($_GET['process'])} selected="selected"{/if}>交易流程</option>
                <option value="0"{if $_GET['process']==0 && IsNum($_GET['process'])} selected="selected"{/if}>待审核</option>
                <option value="1"{if $selectarray['process']==1} selected="selected"{/if}>中标</option>
                <option value="2"{if $selectarray['process']==2} selected="selected"{/if}>失败</option>
                <option value="3"{if $_GET['process']==3} selected="selected"{/if}>待交接</option>
                <option value="4"{if $_GET['process']==4} selected="selected"{/if}>待评价</option>
              </select>
              
            </div>
            
             <div class="col-lg-4">
             <label class="col-lg-2">发布时间</label>
            <input name="dateline1" placeholder="YYYY-MM-DD" type="text" class="form-control col-lg-5 dateline" size="10" value="{if !empty($sqlkey['dateline1'])}{echo $sqlkey['dateline1']}{/if}" style="width:110px; margin-right:10px;"/> <input name="dateline2" type="text" placeholder="YYYY-MM-DD" class="form-control col-lg-5 dateline" size="10" value="{if !empty($sqlkey['dateline2'])}{echo $sqlkey['dateline2']}{/if}" style="width:110px;"/>
              </div>
            
            </div>
            </div>
            
            <div class="row" style="padding-top:8px;">
            <div class="col-lg-12">
            <div class="col-lg-2">
              <input name="buyer_uid" type="text" class="form-control" placeholder="买家UID" value="{if !empty($selectarray['buyer_uid'])}{echo $selectarray['buyer_uid']}{/if}"/>
            </div>
            
            <div class="col-lg-2">
              <input name="buyer_username" type="text" class="form-control" placeholder="买家用户名" value="{if !empty($selectarray['buyer_username'])}{echo $selectarray['buyer_username']}{/if}"/>
            </div>
            
            
             <div class="col-lg-2">
              <input name="seller_uid" type="text" class="form-control" placeholder="卖家UID" value="{if !empty($selectarray['seller_uid'])}{echo $selectarray['seller_uid']}{/if}"/>
            </div>
            
            <div class="col-lg-2">
              <input name="seller_username" type="text" class="form-control" placeholder="卖家用户名" value="{if !empty($selectarray['seller_username'])}{echo $selectarray['seller_username']}{/if}"/>
            </div>


            
             <div class="col-lg-3">
              <input class="btn btn-default btn-azure" name="搜索" type="submit" value="搜索" />
              <input type="hidden" name="search" value="1" />
              
              </div>


            </div>
            </div>
          </form>
        </div>
      </div>
    </div>
  </div>
</div>

<form method="post" id="SubmitForm" action="{echo U($module.'/'.CONTROLLER_NAME.'/orderoperate')}">
<div role="grid" id="editabledatatable_wrapper" class="dataTables_wrapper form-inline no-footer">
  
  <table id="editabledatatable" class="table table-striped table-hover table-bordered dataTable no-footer" aria-describedby="editabledatatable_info">
    <thead>
      <tr role="row">
        <th class="sorting_disabled" rowspan="1" colspan="1" style="width:38px"><div class="checkbox">
              <label>
                <input type="checkbox" id="CheckAll" style="display:none">
                <span class="text"></span></label>
            </div></th>
            
          {foreach $orderarr $key=>$value}
          <th onClick="window.location.href='{echo U($module.'/'.CONTROLLER_NAME.'/order/sqlorder/'.$key.'/iforder/'.$iforder.'/p/'.$pagenum)}'" tabindex="0" aria-controls="editabledatatable" rowspan="1" colspan="1"  aria-sort="ascending" aria-label="{echo $value['name']}" {if $key==$sqlorder} {if $iforder==2}  class="sorting_desc"{else} class="sorting_asc"{/if}{else} class="sorting"{/if}> {echo $value['name']} </th>
          {/foreach}
          
          
        <th class="sorting_disabled" rowspan="1" colspan="1"> </th>
      </tr>
    </thead>
    <tbody>
    
    {if $list}    
    {foreach $list $key=>$value}
    <tr>
      <td style="width:38px;">
      		<div class="checkbox" style="margin:0px;padding:0px;">
            <label style="margin:0px;padding:0px;">
              <input type="checkbox" name="checkbox[]" value="{echo $value['oid']}">
              <span class="text checkbox"></span></label>
          </div>
     </td>
     <td>
        {echo $value['id']}
    </td>
     <td>
        {echo $value['oid']}
    </td>
     <td>
        {echo $value['cid']}
    </td>
    <td>
        {echo $value['buyer_uid']}
    </td>

    <td>
        {echo $value['buyer_username']}
    </td>
    
    <td>
        {echo $value['seller_uid']}
    </td>

    <td>
        {echo $value['seller_username']}
    </td>
    
    <td>
        {if $value['sid']}服务 {echo $value['sid']}{/if}
    </td>

    <td>
        <a href="/task/{echo $value['id']}" target="_blank">{echo $value['subject']}</a>
    </td>
    
    <td>
       {echo FormatDate("Y/m/d",$value['dateline'])}
    </td>
    
    <td>
       {if $value['verifytime']>0}{echo FormatDate("Y/m/d",$value['verifytime'])}{/if}
    </td>
    <td>
       {if $value['money']>0} <span class="color_f60">￥{echo $value['money']/100}</span>{/if}
    </td>
        
    
    <td>
        <a href="javascript:;" onclick="ShowMyDraft('{echo $value['oid']}')">[显示内容]</a>
        
        <div style="word-break:break-all;overflow:auto;width:100%;display:none;padding-top:10px;padding-bottom:20px;" id="MyDraft_{echo $value['oid']}">
        {echo htmlspecialchars_decode($value['content'])}
        </div>  
       
    </td>
    
    <td>
       {if $value['process']==0}未审核{elseif $value['process']==2}失败 {elseif $value['process']==1}中标 {if $value['cid']==0}交接中{elseif $value['cid']>0 && $value['seller_is_evaluate']==0}评价中{/if}{else}失败{/if}
    </td>
    
      <td class=" "><a class="btn btn-info btn-xs edit" href="{echo U($module.'/task/orderedit/id/'.$value['oid'])}"><i class="fa fa-edit"></i> 编辑</a>  <a class="btn btn-danger btn-xs delete" href="javascript:void(0)" onclick="ConfirmDelete({echo $value['oid']},'{echo U($module.'/'.CONTROLLER_NAME.'/orderdelete/id/'.$value['oid'])}')"><i class="fa fa-trash-o"></i> 删除</a></td>
    </tr>
    {/foreach}
    
    {/if}
      </tbody>
    
  </table>
  <div class="row DTTTFooter">
    <div class="col-sm-6">
      <div class="dataTables_info" id="simpledatatable_info" role="alert" aria-live="polite" aria-relevant="all">总共{echo $count}条数据</div>
    </div>
    <div class="col-sm-6">
      <div class="dataTables_paginate paging_bootstrap" id="simpledatatable_paginate">
        <ul class="pagination">
          {if $page}{echo $page}{/if}
        </ul>
      </div>
    </div>
  </div>
</div>
<div class="alert alert-info fade in">
    <button data-dismiss="alert" class="close">
        ×
    </button>
    <i class="fa-fw fa fa-info"></i>
    <strong>提示!</strong> 后台中标与取消操作只是设置它状态,不包含财务支付功能,涉及到财务支付可以在后台财务 支付或扣费.
</div>

  <div class="padding_20 text-center">
    
    <input name="Success" type="submit" value="设置中标" class="btn btn-default shiny"/> <input name="Failure" type="submit" value="设置不合格" class="btn btn-default shiny"/> <input name="Close" type="submit"value="设置待选" class="btn btn-default shiny"/>  <input  name="Delete" type="submit" value="删除" id="confirm" class="btn btn-danger shiny"/>
  </div>
  
</form>

<script type="text/javascript">	   
 function ShowMyDraft(id) {
										
			var display=$("#MyDraft_"+id).css("display");						
						
			if(display=='none'){
				  $("#MyDraft_"+id).show(300);	
		    }else{
				   $("#MyDraft_"+id).hide(300);	
			}			

		 
 }
</script>


{template Public:Admin:footer}